package com.flc.gateway.utils;

/**
 * 通信协议-Field
 *
 * @author haizi
 * @date 2018-01-04
 */
public class Field {

    /** 属性名  */
    private String name;
    /** 开始位置  */
    private int offset;
    /** 长度  */
    private int length;
    /** 类型  */
    private String type;
    /** 注释  */
    private String comments;

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setOffset(int offset) {
        this.offset = offset;
    }

    public int getOffset() {
        return offset;
    }

    public void setLength(int length) {
        this.length = length;
    }

    public int getLength() {
        return length;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getType() {
        return type;
    }

    public String getComments() {
        return comments;
    }

    public void setComments(String comments) {
        this.comments = comments;
    }

    @Override
    public String toString() {
        return "Field{" +
                "name='" + name + '\'' +
                ", offset=" + offset +
                ", length=" + length +
                ", type='" + type + '\'' +
                ", comments='" + comments + '\'' +
                '}';
    }

}